from rest_framework import serializers
from .models import User


class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = "__all__"
        extra_kwargs = {
            'password': {'write_only': True, 'min_length': 5, "max_length": 20},
            'username': {'write_only': True, 'min_length': 5, "max_length": 20},
            'time': {},
        }
